/*
    The I Ching (the Book of Changes) plasmoid.
    Copyright (C) 2002-2009 Jean Pierre Charalambos.
    TrigramSelectorGenerator Jorge Andrés Martínez

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/
#ifndef TRIGRAMSELECTORGENERATOR_H
#define TRIGRAMSELECTORGENERATOR_H

#include <abstractgenerator.h>
#include "trigramselector.h"

// Qt
class QGraphicsGridLayout;
class QGridLayout;
class QGraphicsLinearLayout;

namespace Plasma {
    class GroupBox;
    class ComboBox;
    class Label;
}

class TrigramSelectorGenerator : public AbstractGenerator {

        Q_OBJECT

    public :
        TrigramSelectorGenerator ( Hexagram *hex, QGraphicsWidget* parent = 0 );
        virtual void init();

    public slots:
        virtual void setInterface();
        void setHexagram(QString id);

    private:
        int nameToId(QString name);
        
        Hexagram *hexagram;
        
        Plasma::GroupBox * gridGroup;
        QGraphicsLinearLayout *linearGroupLayout;
        Plasma::Label *hexagramDisplay;
	TrigramSelector *upperTrigramSelector;
	TrigramSelector *lowerTrigramSelector;
};

#endif // TRIGRAMSELECTORGENERATOR_H
